import * as Rx from "rxjs";

export default function () {
  let subject = function () {
    console.log('click')
    console.log(arguments)
    console.log(subject.next)
    subject.next.apply(subject, arguments);
  };

  getEnumerablePropertyNames(Rx.Subject.prototype)
    .forEach(function (property) {
      subject[property] = Rx.Subject.prototype[property];
    });
  Rx.Subject.call(subject);

  return subject;
}

function getEnumerablePropertyNames(target) {
    let result = [];
    let key;
    for (key in target) {
        result.push(key);
    }
    return result;
}
